<script>
export default {
  name: 'Redirect',
  beforeMount() {
    const { params, query } = this.$route
    const { path } = params
    this.$router.push({
      path: '/' + (Array.isArray(path) ? path.join('/') : path),
      query,
      replace: true
    })
  },
  render() {
    return <p />
  }
}
</script>
